<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //promise.all都为 resolve状态时才为解决，错误是会报错(报错可以用catch解决)
        let user1=new Promise((resolve,reject)=>{
            resolve("唐玮");
        })

        let user2=new Promise((resolve,reject)=>{
             resolve("何彩霞")
        })
Promise.all([user1,user2]).then(value=>{
    console.log(value);
}).catch(error=>{
    console.log(error.message+" fails");
})

    </script>
</body>
</html>